module.exports = {
  nav_name: '系统设置', //生成导航菜单
  module_name: 'sys_setting',  //生成路径，与模块名相同
  api: `{
    //系统消息
    page: commonPath + "/admin/sysMessage/page", //分页
    detail: commonPath + '/admin/sysMessage/get', //详情,
    add: commonPath + '/admin/sysMessage/save', //添加
    del: commonPath + "/admin/sysMessage/remove",  //删除

    //意见反馈
    feedback_page: commonPath + "/admin/feedback/page",
    feedback_detail: commonPath + "/admin/feedback/get",

    //协议条款
    sys_setting_page: commonPath + "/admin/sys/config/pageList",  //分页
    sys_setting_detail: commonPath + "/admin/sys/config/getDetail", //协议详情
    sys_setting_edit: commonPath + "/admin/sys/config/update", //更新
  }`,


  //系统消息  
  table1: {
    table_name: 'sys_message',
    nav_name: "系统消息",
    tipsText: "系统设置 >> 系统消息",
    pageApi: "API.sys_setting.page",  //自定义api，高优先级，未设置则取默认page的api
    //获取列表页面
    tableData: [
      { title: '序号', name: 'index', type: "normal" },
      { title: '消息标题', name: 'title', type: "normal", showObj: "{}" },
      { title: '发布时间', name: 'gmtModified', type: "normal", showObj: "{}" },
    ],
    tableOpt: [
      {
        type: "view",
        text: "查看",
        request: false,
        jump: "/sys_setting_sys_message_detail"
      },
      {
        type: "del",
        text: "删除",
        request: true,
        url: "API.sys_setting.del",
        requestType: 'get',
      },
    ],
    search: {
      contentArr: {

      },
      addBtn: {
        //搜索栏具有添加功能按钮时，设置此字段
        type: "add",
        text: "发布消息",
        request: false,
        jump: "/sys_setting_add_message"  //系统消息
      }
    },
  },


  //系统消息 添加
  add_page1: {
    add_page_name: "add_message",
    tipsText: "系统消息 >> 发布消息",
    formData: {
      //三种类型，输入，下拉，图片上传
      input1: {
        labelName: '消息标题',
        inputName: 'title',
        isNeed: 'true',
      },
      //富文本组件 富文本组件添加默认背景
      richText1: {
        labelName: '消息内容',
        inputName: 'content',
        isNeed: 'true',
        minHeight: "180", //高度
        uploadApi: "API.common.upload",
        editContentChangeMethodName: "handleBgEditChange", //改变方法
        isNeed: 'true',
      },
    },
    addBtn: {
      text: '添加',
      url: "API.sys_setting.add"
    }, //
    editBtn: {
      text: '编辑',
      detailUrl: "API.sys_setting.detail",
      editUrl: "API.sys_setting.edit",
      isSplitSearchString: 'true', //列表拼接查询字符串
    },
    cancelBtn: { text: "取消" }, //
  },


  //系统消息详情
  detail_page1: {
    isGenerate: 'false',
    detail_page_name: "sys_message_detail",
    detail_api: "API.sys_setting.detail",
    request_params: `{
          id,
        }`,
    tipsText: "系统设置 >> 系统消息",
    formData: {
      // titleText: "请填写管理员相关信息",
      item1: {
        labelName: '消息标题',
        inputName: 'title',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },

      item2: {
        labelName: '消息内容',
        inputName: 'content',
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      item3: {
        labelName: '发布时间',
        inputName: 'gmtModified',
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
    },
  },


  //意见反馈 列表
  table2: {
    table_name: 'feedback_list',
    nav_name: "意见反馈",
    tipsText: "系统设置 >> 意见反馈",
    pageApi: "API.sys_setting.feedback_page",
    //获取列表页面
    tableData: [
      { title: '序号', name: 'index', type: "normal" },
      { title: '用户昵称', name: 'userName', type: "normal", showObj: "{}" },
      { 
        title: '会员身份', 
        name: 'level', 
        type: "opts", 
        showName: "levelShow",
        showObj: `{
          "1": "试用用户",
          "2": "试用会员",
          "3": "会员",
          "4": "理事",
          "5": "副会长",
          "6": "会长",
        }` 
      },
      { title: '反馈时间', name: 'gmtModified', type: "normal", showObj: "{}" },
    ],
    tableOpt: [
      {
        type: "view",
        text: "查看",
        request: false,
        jump: "/sys_setting_feedback_detail"
      },
    ],
    search: {
      contentArr: {
        // input1: { labelName: '用户昵称', inputName: 'tel' },
        // date1: {
        //   labelName: '反馈时间',
        //   inputName: 'feedbackTime', //仅用于标志
        //   dateConfig: {
        //     startDateName: 'feedbackStartDate',
        //     endDateName: 'feedbackEndDate',
        //     dateChangeMethodsName: 'handleFeedbackDateChange'
        //   }
        // },
      },
      // searchBtn: {
      //   text: "查询", //链接与table请求接口相同，不做另外配置
      // },
    },
  },

  //意见反馈详情
  detail_page2: {
    detail_page_name: "feedback_detail",
    detail_api: "API.sys_setting.feedback_detail",
    request_params: `{
            id,
          }`,
    tipsText: "系统设置 >> 意见反馈",
    formData: {
      // titleText: "请填写管理员相关信息",
      item1: {
        labelName: '反馈内容',
        inputName: 'content',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },

      item2: {
        labelName: '反馈时间',
        inputName: 'gmtModified',
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      item3: {
        labelName: '用户昵称',
        inputName: 'userName',
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      item4: {
        labelName: '用户身份',
        inputName: 'level',
        type: "opts",
        optShowName: "levelOpts",
        optShowStr: `{
          "1": "试用用户",
          "2": "试用会员",
          "3": "会员",
          "4": "理事",
          "5": "副会长",
          "6": "会长",
        }`
      },
    },
  },


  //系统配置列表 列表
  table3: {
    isGenerate: 'false',
    table_name: 'sys_setting_list',
    nav_name: "系统配置",
    tipsText: "系统设置 >> 系统配置列表",
    pageApi: "API.sys_setting.sys_setting_page",
    //获取列表页面
    tableData: [
      { title: '序号', name: 'index', type: "normal" },
      {
        title: '类别',
        name: 'type',
        type: "opts",
        showName: "typeShow",
        showObj: `{
          "1": "关于我们",
          "2": "注册协议", 
          "3": "隐私政策条款", 
          "4": "联系我们",
          "5": "用户规范", 
          "6": "商会介绍", 
          "7": "会员权益",  
          "8": "试用天数", 
          "9": "会员续费费用", 
          "10": "理事续费费用", 
          "11": "副会长续费费用",
          "12": "常见问题" 
        }`
      },
      // { title: '内容', name: 'content', type: "normal", showObj: "{}" },
      { title: '更新时间', name: 'gmtModified', type: "normal", showObj: "{}" },
    ],
    tableOpt: [
      {
        type: "modify",
        text: "编辑",
        request: false,
        jump: "/sys_setting_protocol_editor"
      },
    ],
    search: {
      contentArr: {
        // input1: { labelName: '用户昵称', inputName: 'tel' },
        // date1: {
        //   labelName: '反馈时间',
        //   inputName: 'feedbackTime', //仅用于标志
        //   dateConfig: {
        //     startDateName: 'feedbackStartDate',
        //     endDateName: 'feedbackEndDate',
        //     dateChangeMethodsName: 'handleFeedbackDateChange'
        //   }
        // },
      },
      // searchBtn: {
      //   text: "查询", //链接与table请求接口相同，不做另外配置
      // },
    },
  },

  //富文本编辑页面
  bg_editor_page: {
    isGenerate: "false",
    bg_editor_page_name: 'protocol_editor',
    is_show_nav: "false", //是否展示刀
    // nav_name: "协议条款",
    tipsText: "系统设置 >> ",  //
    formData: {
      title: `协议内容`,
      inputName: 'content',
      minHeight: "180", //高度
      uploadApi: "API.common.upload",
      editContentChangeMethodName: "handleBgEditChange", //改变方法

      settingTypeId: "2", //系统设置类型的id 1关于我们 2注册协议 3隐私政策条款 4联系我们 5用户规范 6商会介绍 7会员权益
      settingDataId: "5",  //商会数据id
      sysDetailApi: "API.sys_setting.sys_setting_detail", //协议详情接口
      sysEditApi: "API.sys_setting.sys_setting_edit", //编辑详情接口
    },
    // addBtn: {
    //   text: '添加',
    //   url: "API.sys_setting.add"
    // }, 
    editBtn: {
      text: '保存',
      editUrl: "API.sys_setting.edit",
    },
    //详情配置
    detailConfig: {
      detailUrl: "API.sys_setting.detail",
    }
  },


}
